From: Stefan Monnier Date: Wed, 27 Mar 2002 22:27:44 +0000 (+0000) Subject: (xml-lite-in-string-p): Simplify. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~58040 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=843e95014b85b78ea00e2fae4946a011e0951de3;p=emacs.git (xml-lite-in-string-p): Simplify. --- diff --git a/lisp/textmodes/xml-lite.el b/lisp/textmodes/xml-lite.el index a32a7a8f8f4..2833ea88356 100644 --- a/lisp/textmodes/xml-lite.el +++ b/lisp/textmodes/xml-lite.el @@ -95,15 +95,17 @@ Set this to nil if you don't want a modeline indicator for xml-lite-mode." (bolp))) (defun xml-lite-in-string-p (&optional limit) - "Determine whether point is inside a string." + "Determine whether point is inside a string. + +Parse begins from LIMIT, which defaults to the preceding occurence of a tag +at the beginning of a line." (let (syntax-info) (or limit (setq limit (or (save-excursion (re-search-backward "^[ \t]*<" nil t)) (point-min)))) (setq syntax-info (parse-partial-sexp limit (point))) - (if (nth 3 syntax-info) - (list (nth 3 syntax-info) (nth 8 syntax-info))))) + (if (nth 3 syntax-info) (nth 8 syntax-info)))) ;; Parsing